package com.yy.excel_port;

import com.github.javafaker.Faker;

import java.util.ArrayList;
import java.util.List;

/**
 * @author MinghuaChen
 * @since 2025/2/18 21:15
 */
public class TestDataGenerator {

    private static Faker faker = new Faker();

    public static List<DataRow> generateData(int count) {
        List<DataRow> dataList = new ArrayList<>(count);
        for (int i = 0; i < count; i++) {
            DataRow row = new DataRow();
            row.setField1(faker.name().firstName());
            row.setField2(faker.address().city());
            // 为其他字段赋值
            row.setField50(faker.lorem().word());
            dataList.add(row);
        }
        return dataList;
    }
}
